# Contributor: André Klitzing <aklitzing@gmail.com>
# Maintainer: André Klitzing <aklitzing@gmail.com>
pkgname=py3-asn1crypto
_pyname=asn1crypto
pkgver=1.5.1_git20231103
pkgrel=1
_gitrev="b763a757bb2bef2ab63620611ddd8006d5e9e4a2"
pkgdesc="Python3 ASN.1 library with a focus on performance and a pythonic API"
url="https://github.com/wbond/asn1crypto"
arch="noarch"
license="MIT"
depends="python3"
makedepends="py3-setuptools"
subpackages="$pkgname-pyc"
source="$_pyname-$pkgver.tar.gz::https://github.com/wbond/asn1crypto/archive/$_gitrev.tar.gz"
builddir="$srcdir/$_pyname-$_gitrev"

replaces="py-asn1crypto" # Backwards compatibility
provides="py-asn1crypto=$pkgver-r$pkgrel" # Backwards compatibility

build() {
	python3 setup.py build
}

check() {
	python3 run.py tests
}

package() {
	python3 setup.py install --skip-build --root="$pkgdir"
}

sha512sums="
db0e18e77ffdee6a5380f62fd919782ee450cd9517e994db0fc006047fd860fbd671899595669822b1ec2fb56011fc300dbcb9bcb1af32c3a991bc7fbfe5ea51  asn1crypto-1.5.1_git20231103.tar.gz
"
